<div class="error">
    <?php echo validation_errors(); ?>
</div>

<?php echo form_open(base_url().'/admin.php?c=lawyer&m='.(isset($entry)?'update':'add')); ?>
<?php echo isset($entry)?form_hidden('id', $entry->id):''; ?>

<div class="form_row">
    <label for="photo">照片</label>
    <?php echo form_dropdown('photo', $photos, isset($entry)?$entry->photo_id:set_value('photo')); ?>
</div>

<div class="form_row">
    <label for="name">姓名</label>
    <input type="text" name="name" id="name" value="<?php echo isset($entry)? $entry->name : set_value('name'); ?>" /> *
</div>

<div class="form_row">
    <label for="sex">性别</label>
    <?php echo form_dropdown('sex',$sex_array,isset($entry)?$entry->sex:set_value('sex')); ?>
</div>

<div>个人简介</div>
<div class="form_row">
    <textarea name="content" rows="10" cols="50">
        <?php echo isset($entry)? $entry->content : set_value('content'); ?>
    </textarea>
</div>

<div class="form_btn">
    <input type="submit" name="submit" value="提交"/>
</div>
<?php echo form_close(); ?>

<?php $this->load->view('richeditor'); ?>
